@include('Home.head')
<style>
    .row {
        margin-bottom: .25rem;
    }

    .row > .cell-6 {
        width: 50%;
        padding: 2px 5px 5px 5px;
    }

    .row, .column {

        display: flex;
        margin: -.25rem -.25rem 0;
        margin-bottom: 0px;
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-align-items: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        -webkit-align-content: stretch;
        -ms-flex-line-pack: stretch;
        align-content: stretch;
        -webkit-flex: auto;
        -ms-flex: auto;
        flex: auto;
    }

    .row, .column {
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        margin: -.25rem -.25rem 0;
        margin-bottom: 0px;
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-align-items: stretch;
        -ms-flex-align: stretch;
        align-items: stretch;
        -webkit-align-content: stretch;
        -ms-flex-line-pack: stretch;
        align-content: stretch;
        -webkit-flex: auto;
        -ms-flex: auto;
        flex: auto;
    }

    .wai {
        background-color: rgba(48, 149, 244, 1.00);
        color: #000;
        text-align: center;
        border-radius: 5px;
        height: 75px;
        line-height: 25px;
        padding-top: 15px;
        background-image: url('/img/home/user/bg_2.png');
        background-size: cover;
        background-size: 100%;
    }

    .wai b {
        font-size: 20px;
        color: red;
    }

    .am-btn.am-radius {
        border-radius: 2px;
        height: 100px;
        line-height: 75px;
        font-size: 20px;
    }
</style>
<body>
<div class="container" id="app">
    @include('Home.member.header')
    <div class="am-cf cart-panel">

        <div class="cart-panel">
            <div class="row">
               <!-- {{--<div class="cell-6 q" v-show="MemberList.userType=='z'">--}}
                    {{--<div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.performance1 }}</b><br>A区总业绩</div>--}}
                {{--</div>--}}
                {{--<div class="cell-6 q" v-show="MemberList.userType=='z'">--}}
                    {{--<div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.performance2 }}</b><br>B区总业绩</div>--}}
                {{--</div>--}} -->
               <!-- <div class="cell-6 q">
                    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.credit1 }}</b><br>积分</div>
                </div> -->
                <!-- <div class="cell-6 q">
                    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.credit4 }}</b><br>积分</div>
                </div> -->
               <!-- <div class="cell-6 q">
                    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.credit2 }}</b><br>奖励积分</div>
                </div> -->
				
				<div class="cell-6 q">
				    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.numbers }}</b><br>个人参与总局数</div>
				</div>
				
				<div class="cell-6 q">
				    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.single_achievement }}</b><br>个人中奖业绩</div>
				</div>
				
				<div class="cell-6 q">
				    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.day_achievement }}</b><br>个人当日中奖业绩</div>
				</div>
				
				<div class="cell-6 q">
				    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.team_achievement }}</b><br>团队业绩</div>
				</div>
				
				<div class="cell-6 q">
				    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.achievement_increment }}</b><br>团队新增业绩</div>
				</div>
				
				<div class="cell-6 q">
				    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.team_numbers }}</b><br>团队总参与局数</div>
				</div>

                <div class="cell-6 q" v-show="MemberList.userType=='c'">

                    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.super_team_count }}</b><br>折扣业绩</div>

                </div>
               <!-- {{--<div class="cell-6 q" v-show="MemberList.userType=='w'">--}}
                    {{--<div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.credit5 }}</b><br>复消币</div>--}}
                {{--</div>--}}
                {{--<div class="cell-6 q" v-show="MemberList.userType=='w'">--}}
                    {{--<div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.complex_money }}</b><br>复消业绩</div>--}}
                {{--</div>--}}
                {{--<div class="cell-6 q">--}}
                    {{--<div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.userStatus }}</b><br>账户状态</div>--}}
                {{--</div>--}} -->
                <div class="cell-6" v-show="MemberList.userType=='z'" v-on:click="upgrade()">
                    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.level_name }}</b><br>升级会员</div>
                </div>
                <!-- <div class="cell-6" v-show="MemberList.userType!='z'" >
                    <div class="tile bg3 rounded wai shadow-1"><b>@{{ MemberList.level_name }}</b><br>会员等级</div>
                </div> -->
            </div>
        </div>

    </div>

    @include('Home.foot')
</div>
</body>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            title: '会员中心',
            MemberList: [],
            credit:0.00 //复投币
        },
        methods: {
            //初始化 系统管理员列表
            initialize: function () {
                var type = this.obtain('type');
                // console.log(type);
                $.post("/home/member/dofinance", {'_token': '{{csrf_token()}}', type: type}, function (res) {
                    if (res.code) {
                        app.MemberList = res.data;
                        if(type=='z'){
                            app.credit = res.data.credit6
                        }else {
                            app.credit = res.data.credit3
                        }
                    } else {
                        layer.msg(res.data);
                    }
                });
            },
            upgrade:function () {

                location.href = '/home/member/justupgradeview';
            },
            //获取url id
            obtain: function (val) {
                var query = window.location.search.substring(1);
                var vars = query.split("&");
                for (var i = 0; i < vars.length; i++) {
                    var pair = vars[i].split("=");
                    if (pair[0] == val) {
                        return pair[1];
                    }
                }
            },
        },
        //自动执行
        mounted: function () {
            this.initialize();
        },
    })
</script>

</html>
